<script type="text/javascript"> window.print(); window.onafterprint = window.close; </script>